/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * TelaBebidas.java
 *
 * Created on 15/06/2010, 19:28:54
 */

package br.com.pi.SmartFast.view;

//importações
import br.com.pi.SmartFast.controler.ControleTelaCardapio;

/**
 *
 * @author Lídia comentario
 */
public class TelaBebidas extends javax.swing.JFrame {
    ControleTelaCardapio cont; //inicializa a variável
    TelaCliente tc = new TelaCliente();
    TelaPedidos tp = new TelaPedidos();

    /** Creates new form TelaBebidas */
    public TelaBebidas() {
        initComponents();

        cont = new ControleTelaCardapio(botaoRefeicoes, botaoSobremesas, botaoBebidas, jList_Bebidas,
                jList_DescricaoBebidas, jList_Bebidas, jList_DescricaoBebidas, jList_Bebidas, jList_DescricaoBebidas,
                jList_ValorBebidas, jList_ValorBebidas, jList_ValorBebidas, jLabel_FotoBebidas, jLabel_FotoBebidas,
                jLabel_FotoBebidas, Quantidade_Bebidas, Quantidade_Bebidas, Quantidade_Bebidas, this);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        botaoRefeicoes = new javax.swing.JButton();
        botaoSobremesas = new javax.swing.JButton();
        botaoBebidas = new javax.swing.JButton();
        botaoPedidosBebidas = new javax.swing.JButton();
        botaoFecharContaBebidas = new javax.swing.JButton();
        botaoGarconBebidas = new javax.swing.JButton();
        Fundo = new javax.swing.JPanel();
        jLabel_ValorBebidas = new javax.swing.JPanel();
        B_AdicionarBebidas = new javax.swing.JButton();
        Quantidade_Bebidas = new javax.swing.JSpinner();
        L_Quantidade1 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jList_Bebidas = new javax.swing.JList();
        jScrollPane2 = new javax.swing.JScrollPane();
        jList_DescricaoBebidas = new javax.swing.JList();
        jLabel1 = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jList_ValorBebidas = new javax.swing.JList();
        jLabel_FotoBebidas = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(1024, 768));
        setUndecorated(true);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });

        botaoRefeicoes.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/pi/SmartFast/imagens/imgRefeicoes.png"))); // NOI18N
        botaoRefeicoes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoRefeicoesActionPerformed(evt);
            }
        });

        botaoSobremesas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/pi/SmartFast/imagens/imgSobremesas.png"))); // NOI18N
        botaoSobremesas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoSobremesasActionPerformed(evt);
            }
        });

        botaoBebidas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/pi/SmartFast/imagens/imgBebidas2.png"))); // NOI18N
        botaoBebidas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoBebidasActionPerformed(evt);
            }
        });

        botaoPedidosBebidas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/pi/SmartFast/imagens/imgPedidos.png"))); // NOI18N
        botaoPedidosBebidas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoPedidosBebidasActionPerformed(evt);
            }
        });

        botaoFecharContaBebidas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/pi/SmartFast/imagens/imgFecharConta.png"))); // NOI18N
        botaoFecharContaBebidas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoFecharContaBebidasActionPerformed(evt);
            }
        });

        botaoGarconBebidas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/pi/SmartFast/imagens/imgGarcon.png"))); // NOI18N
        botaoGarconBebidas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoGarconBebidasActionPerformed(evt);
            }
        });

        Fundo.setBackground(new java.awt.Color(255, 255, 255));
        Fundo.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jLabel_ValorBebidas.setBackground(new java.awt.Color(255, 255, 255));

        B_AdicionarBebidas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/pi/SmartFast/imagens/imgAdicionar.png"))); // NOI18N
        B_AdicionarBebidas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                B_AdicionarBebidasActionPerformed(evt);
            }
        });

        Quantidade_Bebidas.setModel(new javax.swing.SpinnerNumberModel(1, 1, 20, 1));

        L_Quantidade1.setFont(new java.awt.Font("Tahoma", 1, 14));
        L_Quantidade1.setText("Quantidade:");

        jList_Bebidas.setFont(new java.awt.Font("Verdana", 0, 18));
        jList_Bebidas.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jList_BebidasMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                jList_BebidasMouseEntered(evt);
            }
        });
        jScrollPane1.setViewportView(jList_Bebidas);

        jList_DescricaoBebidas.setFont(new java.awt.Font("Verdana", 0, 18));
        jList_DescricaoBebidas.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jList_DescricaoBebidasMouseClicked(evt);
            }
        });
        jScrollPane2.setViewportView(jList_DescricaoBebidas);

        jList_ValorBebidas.setFont(new java.awt.Font("Verdana", 0, 18));
        jList_ValorBebidas.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { " " };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jScrollPane3.setViewportView(jList_ValorBebidas);

        jLabel_FotoBebidas.setText("Foto");

        jLabel4.setFont(new java.awt.Font("Times New Roman", 2, 24));
        jLabel4.setText("Custo");

        jLabel3.setFont(new java.awt.Font("Times New Roman", 2, 24));
        jLabel3.setText("Ingredientes");

        jLabel2.setFont(new java.awt.Font("Times New Roman", 2, 24));
        jLabel2.setText("Produtos");

        javax.swing.GroupLayout jLabel_ValorBebidasLayout = new javax.swing.GroupLayout(jLabel_ValorBebidas);
        jLabel_ValorBebidas.setLayout(jLabel_ValorBebidasLayout);
        jLabel_ValorBebidasLayout.setHorizontalGroup(
            jLabel_ValorBebidasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jLabel_ValorBebidasLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jLabel_ValorBebidasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jLabel_ValorBebidasLayout.createSequentialGroup()
                        .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGap(264, 264, 264))
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 353, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(jLabel_ValorBebidasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jLabel_ValorBebidasLayout.createSequentialGroup()
                        .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 58, Short.MAX_VALUE)
                        .addGap(540, 540, 540))
                    .addGroup(jLabel_ValorBebidasLayout.createSequentialGroup()
                        .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGap(476, 476, 476))
                    .addGroup(jLabel_ValorBebidasLayout.createSequentialGroup()
                        .addGroup(jLabel_ValorBebidasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 220, Short.MAX_VALUE)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 220, Short.MAX_VALUE))
                        .addGap(24, 24, 24)
                        .addGroup(jLabel_ValorBebidasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel1)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jLabel_ValorBebidasLayout.createSequentialGroup()
                                .addComponent(L_Quantidade1, javax.swing.GroupLayout.DEFAULT_SIZE, 91, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jLabel_ValorBebidasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jLabel_ValorBebidasLayout.createSequentialGroup()
                                        .addComponent(jLabel_FotoBebidas, javax.swing.GroupLayout.DEFAULT_SIZE, 208, Short.MAX_VALUE)
                                        .addGap(49, 49, 49))
                                    .addGroup(jLabel_ValorBebidasLayout.createSequentialGroup()
                                        .addComponent(Quantidade_Bebidas, javax.swing.GroupLayout.DEFAULT_SIZE, 39, Short.MAX_VALUE)
                                        .addGap(18, 18, 18)
                                        .addComponent(B_AdicionarBebidas, javax.swing.GroupLayout.PREFERRED_SIZE, 200, Short.MAX_VALUE)))))))
                .addContainerGap())
        );
        jLabel_ValorBebidasLayout.setVerticalGroup(
            jLabel_ValorBebidasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jLabel_ValorBebidasLayout.createSequentialGroup()
                .addGroup(jLabel_ValorBebidasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jLabel_ValorBebidasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 314, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jLabel_ValorBebidasLayout.createSequentialGroup()
                        .addGap(32, 32, 32)
                        .addComponent(jLabel1)
                        .addGap(70, 70, 70)
                        .addComponent(jLabel_FotoBebidas, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jLabel_ValorBebidasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jLabel_ValorBebidasLayout.createSequentialGroup()
                                .addGap(17, 17, 17)
                                .addComponent(B_AdicionarBebidas)
                                .addGap(0, 50, Short.MAX_VALUE))
                            .addGroup(jLabel_ValorBebidasLayout.createSequentialGroup()
                                .addGap(50, 50, 50)
                                .addGroup(jLabel_ValorBebidasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(jLabel_ValorBebidasLayout.createSequentialGroup()
                                        .addComponent(jLabel4)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jLabel_ValorBebidasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(L_Quantidade1, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(Quantidade_Bebidas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 378, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(48, 48, 48))
        );

        javax.swing.GroupLayout FundoLayout = new javax.swing.GroupLayout(Fundo);
        Fundo.setLayout(FundoLayout);
        FundoLayout.setHorizontalGroup(
            FundoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(FundoLayout.createSequentialGroup()
                .addComponent(jLabel_ValorBebidas, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        FundoLayout.setVerticalGroup(
            FundoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(FundoLayout.createSequentialGroup()
                .addComponent(jLabel_ValorBebidas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(Fundo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(botaoRefeicoes, javax.swing.GroupLayout.DEFAULT_SIZE, 229, Short.MAX_VALUE)
                        .addGap(154, 154, 154)
                        .addComponent(botaoBebidas, javax.swing.GroupLayout.PREFERRED_SIZE, 225, Short.MAX_VALUE)
                        .addGap(162, 162, 162)
                        .addComponent(botaoSobremesas, javax.swing.GroupLayout.DEFAULT_SIZE, 229, Short.MAX_VALUE)
                        .addGap(0, 0, 0))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(botaoPedidosBebidas, javax.swing.GroupLayout.DEFAULT_SIZE, 161, Short.MAX_VALUE)
                        .addGap(271, 271, 271)
                        .addComponent(botaoFecharContaBebidas, javax.swing.GroupLayout.DEFAULT_SIZE, 161, Short.MAX_VALUE)
                        .addGap(243, 243, 243)
                        .addComponent(botaoGarconBebidas, javax.swing.GroupLayout.DEFAULT_SIZE, 163, Short.MAX_VALUE)
                        .addGap(0, 0, 0)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(botaoBebidas, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(botaoSobremesas, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(botaoRefeicoes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(12, 12, 12)
                .addComponent(Fundo, javax.swing.GroupLayout.PREFERRED_SIZE, 473, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(botaoPedidosBebidas)
                    .addComponent(botaoGarconBebidas)
                    .addComponent(botaoFecharContaBebidas))
                .addContainerGap(129, Short.MAX_VALUE))
        );

        layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {botaoBebidas, botaoRefeicoes, botaoSobremesas});

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void botaoRefeicoesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoRefeicoesActionPerformed
    cont.Refeicoes();    
    
    }//GEN-LAST:event_botaoRefeicoesActionPerformed

    private void botaoSobremesasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoSobremesasActionPerformed
     cont.Sobremesas();
    }//GEN-LAST:event_botaoSobremesasActionPerformed

    private void botaoFecharContaBebidasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoFecharContaBebidasActionPerformed
       new TelaFecharConta().setVisible(true);
    }//GEN-LAST:event_botaoFecharContaBebidasActionPerformed

    private void botaoGarconBebidasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoGarconBebidasActionPerformed
        cont.ajudaGarcom();
    }//GEN-LAST:event_botaoGarconBebidasActionPerformed

    private void botaoPedidosBebidasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoPedidosBebidasActionPerformed
        new TelaPedidos().setVisible(true);
    }//GEN-LAST:event_botaoPedidosBebidasActionPerformed

    private void botaoBebidasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoBebidasActionPerformed
       cont.Bebidas();
    }//GEN-LAST:event_botaoBebidasActionPerformed

    @SuppressWarnings("static-access")
    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
        cont.aoAbrirTela(tc.opcao);
        cont.aoAbrirTela2(tp.opcao);
    }//GEN-LAST:event_formWindowOpened

    private void jList_DescricaoBebidasMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jList_DescricaoBebidasMouseClicked

}//GEN-LAST:event_jList_DescricaoBebidasMouseClicked

    private void jList_BebidasMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jList_BebidasMouseEntered
        // TODO add your handling code here:
}//GEN-LAST:event_jList_BebidasMouseEntered

    private void jList_BebidasMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jList_BebidasMouseClicked
        cont.getDescricaoBebidas();
        cont.getFotoBebidas();
        cont.getValorBebidas();
}//GEN-LAST:event_jList_BebidasMouseClicked

    private void B_AdicionarBebidasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_B_AdicionarBebidasActionPerformed
        cont.BotaoAdicionar(Quantidade_Bebidas, jList_Bebidas,jList_ValorBebidas);
}//GEN-LAST:event_B_AdicionarBebidasActionPerformed

    /**
    * @param args the command line arguments
    */
//    public static void main(String args[]) {
//        java.awt.EventQueue.invokeLater(new Runnable() {
//            public void run() {
//                new TelaBebidas().setVisible(true);
//            }
//        });
//    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton B_AdicionarBebidas;
    private javax.swing.JPanel Fundo;
    private javax.swing.JLabel L_Quantidade1;
    private javax.swing.JSpinner Quantidade_Bebidas;
    private javax.swing.JButton botaoBebidas;
    private javax.swing.JButton botaoFecharContaBebidas;
    private javax.swing.JButton botaoGarconBebidas;
    private javax.swing.JButton botaoPedidosBebidas;
    private javax.swing.JButton botaoRefeicoes;
    private javax.swing.JButton botaoSobremesas;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel_FotoBebidas;
    private javax.swing.JPanel jLabel_ValorBebidas;
    private javax.swing.JList jList_Bebidas;
    private javax.swing.JList jList_DescricaoBebidas;
    private javax.swing.JList jList_ValorBebidas;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    // End of variables declaration//GEN-END:variables

}
